// Fill out your copyright notice in the Description page of Project Settings.

#include "WorldRoad.h"
#include "WorldEntityReferencing.h"

WORLD_ENTITY_META_DEFINE(FWorldRoad, FWorldConnectable);

FWorldRoad::FWorldRoad()
	: Super()
	, Length(this, 0.0)
	, Junction(this)
	, Link(this)
	, Type(this)
	, PlanView(this)
	, ElevationProfile(this)
	, LateralProfile(this)
	, Lanes(this)
	, Objects(this)
	, Signals(this)
	, Surface(this)
	, Axis(FWorldEntityAxis::Inherit())
{}

FWorldRoad::FWorldRoad(const json& j)
	: Super(j)
	, Length(this, 0.0, _xml, "length")
	, Junction(this, _xml, "junction")
	, Link(this, _xml, "link")
	, Type(this, _xml, "type")
	, PlanView(this, _xml, "planView")
	, ElevationProfile(this, _xml, "elevationProfile")
	, LateralProfile(this, _xml, "lateralProfile")
	, Lanes(this, _xml, "lanes")
	, Objects(this, _xml, "objects")
	, Signals(this, _xml, "signals")
	, Surface(this, _xml, "surface")
	, Axis(FWorldEntityAxis::Inherit())
{}

FWorldRoad::~FWorldRoad()
{}

void FWorldRoad::Resolve(FWorldEntityReferencing& referencing)
{
	Super::Resolve(referencing);
	referencing
		.Resolve(Junction)
		.Resolve(Link)
		.Resolve(Type)
		.Resolve(PlanView)
		.Resolve(ElevationProfile)
		.Resolve(LateralProfile)
		.Resolve(Lanes)
		.Resolve(Objects)
		.Resolve(Signals)
		.Resolve(Surface);
}
